/**
 * 描述: 封装组件库
 * 作者: huang
 * 日期: 2020/11/11 
 * */
import simpleHeader from './simpleHeader/index.vue' // 头部
const components = {
    simpleHeader
}

const install = (Vue = {}) => {
    if (install.installed) return;
    Object.keys(components).forEach(component => {
      Vue.component(components[component].name, components[component]);
    });
    console.log(Vue,'-------')
    install.installed = true;
  };
  
  install.installed = false;
  if (typeof window !== "undefined" && window.Vue) {
    console.log(window.Vue,'window')
  
     
    install(window.Vue);
    install.installed = true;
  }
  
  const Vcomp = {
    ...components,
    install
  };
  console.log(Vcomp,'=======')
  console.log(components,'components')
  console.log(install,'install')
  
  
  export default Vcomp